using UnityEngine;
using System.Collections;

public class BackPaddle : MonoBehaviour {
	
	public GameObject FrontPaddle;
	public GameObject MiddlePaddle;
	
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}
	
	void OnCollisionEnter(Collision collision)
	{
		if(collision.gameObject.tag == "Bullet") 
		{
			if(FrontPaddle.collider.enabled == true)
			{
			Destroy(collision.gameObject);
			Bullet.score += 300;
			audio.PlayOneShot(audio.clip);
			}
			else if(MiddlePaddle.collider.enabled == true)
			{
			Destroy(collision.gameObject);
			Bullet.score += 200;
			audio.PlayOneShot(audio.clip);	
			}
			else
			{
			Destroy(collision.gameObject);
			Bullet.score += 100;
			audio.PlayOneShot(audio.clip);
			}
		}
	}
}
